import Mock from 'mockjs'

const students=[
  {
    key: '0',
    icon:'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1611373914,2096982023&fm=15&gp=0.jpg',
    gradeno: '4',
    classno: '3',
    educode:'aHKD9393',
    name: '你单独',
    sex: '0',
    sfz: '130194857647383920',
    stuno: '33',
    tel: '111111111111',
    role_parents: [0],
    address:'爱仕达SV十大歌手的方法是订购手动发送到发送到发斯蒂芬',
    bind_status:'0',
    bindcode:'fwetsvarasdasdgs',
    pay_status:'1',
    describe:'这娃很好很好很好',//备注
    active:1,//激活状态
  }
]

const parents=[
  {
    id: '0',
    bindcode:'abc',
    educode:'aHKD9393',
    name: '曹加一',
    parentid: '2',
    tel: '12345678909',
    openid: 'vcsdfhdfgjdfvsd',

  },
  {
    id: '1',
    bindcode:'abcd',
    educode:'aHKD93999',
    name: '曹加二',
    parentid: '1',
    role_parent: '妈妈',
    tel: '12345678909',
    openid: 'vcsdfhdfgjdfvsd',
  },
  {
    id: '2',
    bindcode:'abcde',
    educode:'aHKD9344',
    name: '曹加三',
    parentid: '5',
    role_parent: '姥姥',
    tel: '12345678909',
    openid: 'vcsdfhdfgjdfvsd',
  }
]

export default [
  {
    url: '/vue-admin-template/students',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: students
      }
    }
  },

  {
    url: '/vue-admin-template/student',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/students/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/students/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },



  {
    url: '/vue-admin-template/parents',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: parents
      }
    }
  },

  {
    url: '/vue-admin-template/parents',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/parents/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/parents/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  }
]
